home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-2 / Inter.Net 55-2.iso / Mandrake / mdkinst / usr / bin / perl-install / c / stuff.pm
Encoding:
Perl POD Document  |  2000-01-12  |  1.1 KB  |  31 lines

  1. package c::stuff;
  2.  
  3.  
  4.  
  5.  
  6. require DynaLoader;
  7.  
  8. @ISA = qw(DynaLoader);
  9. $VERSION = '0.01';
  10.  
  11. bootstrap c::stuff $VERSION;
  12.  
  13. sub headerGetEntry {
  14.     my ($h, $q) = @_;
  15.     $h or log::l("empty header in headerGetEntry"), return;
  16.     $q eq 'name' and return headerGetEntry_string($h, RPMTAG_NAME());
  17.     $q eq 'group' and return headerGetEntry_string($h, RPMTAG_GROUP());
  18.     $q eq 'version' and return headerGetEntry_string($h, RPMTAG_VERSION());
  19.     $q eq 'release' and return headerGetEntry_string($h, RPMTAG_RELEASE());
  20.     $q eq 'summary' and return headerGetEntry_string($h, RPMTAG_SUMMARY());
  21.     $q eq 'description' and return headerGetEntry_string($h, RPMTAG_DESCRIPTION());
  22.     $q eq 'arch' and return headerGetEntry_string($h, RPMTAG_ARCH());
  23.     $q eq 'size' and return headerGetEntry_int($h, RPMTAG_SIZE());
  24.     $q eq 'filenames' and return headerGetEntry_string_list($h, RPMTAG_FILENAMES());
  25.     $q eq 'obsoletes' and return headerGetEntry_string_list($h, RPMTAG_OBSOLETES());
  26.     $q eq 'requires' and return headerGetEntry_string_list($h, RPMTAG_REQUIRENAME());
  27.     $q eq 'fileflags' and return headerGetEntry_int_list($h, RPMTAG_FILEFLAGS());
  28. }
  29.  
  30. 1;
  31.